package cc.geguol.tcpserver.dao;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

import cc.geguol.tcpserver.pojo.Account;

/**
 * Created by 13687 on 2017/2/26.
 */
@Component
public class UserDao {

	@Resource(name = "jdbcTemp")
	private JdbcTemplate jdbcTemplate;

	public void save(Account account){
		String sql =  "INSERT INTO t_admin(adminName,pwd) VALUES (?,?)";
		jdbcTemplate.update(sql,account.getAccName(),account.getAccPass());
	}
}
